<style type="text/css">
	.pagination a{display: block;float: left;border-bottom-left-radius: 3px;border-top-left-radius: 3px;padding: 5px 10px;font-size: 12px;font-weight: 500;border-radius: 2px;}
	.pagination span{display: block;float: left;border-bottom-left-radius: 3px;border-top-left-radius: 3px;background-color: #fafafa;border: 1px solid #dddddd;padding: 5px 10px;font-size: 12px;font-weight: 500;border-radius: 2px;}

</style>
<link rel="stylesheet" href="/NewAdmin/css/app.v1.css" />

<div class="main-content">

	<section class="scrollable wrapper">
		<!--<div class="row panel-body" style="padding-top:0px;">
			<a href="http://test.niushop.com/index.php/platform/member/memberlist.html" class="btn btn-sm btn-primary">会员列表</a>
			<a href="http://test.niushop.com/index.php/platform/member/memberlevellist.html" class="btn btn-sm btn-default">会员等级</a>
			<a href="http://test.niushop.com/index.php/platform/member/usercommissionwithdrawlist.html" class="btn btn-sm btn-default">会员提现</a>
			<a href="http://test.niushop.com/index.php/platform/member/pointlist.html" class="btn btn-sm btn-default">积分管理</a>
			<a href="http://test.niushop.com/index.php/platform/member/accountlist.html" class="btn btn-sm btn-default">余额管理</a>
			<a href="http://test.niushop.com/index.php/platform/member/weixinfanslist.html" class="btn btn-sm btn-default">粉丝列表</a>
		</div>-->
		<!-- 操作提示  start -->
		<!-- 操作提示  end -->
		<form action="__CONTROLLER__/users_list/" method="get">
		<div class="row padder-v">
			<div class="col-sm-2">
				<a href="{:U('users/users_list',array('type'=>0))}"  class="btn btn-sm <eq name='order_type' value='0'>btn-default</eq><neq name='order_type' value='0'>btn-success</neq>">全部</a>
				<a href="{:U('users/users_list',array('type'=>1))}"  class="btn btn-sm <eq name='order_type' value='1'>btn-default</eq><neq name='order_type' value='1'>btn-warning</neq>">第三方用户</a>
				<a href="{:U('users/users_list',array('type'=>2))}"  class="btn btn-sm <eq name='order_type' value='2'>btn-default</eq><neq name='order_type' value='2'>btn-danger</neq>">注册用户</a>
			</div>
			<div class="col-sm-6">
				<input type="text" name="phone" value="<?=$_GET['phone']?>" class="form-control input-sm " placeholder="请输入用户手机号" style="height: 35px;width: 16%;float: left;"/>
				<input type="number" name="min_price" value="<?=$_GET['min_price']?>" class="form-control input-sm" placeholder="请输入消费金额最小值" style="height: 35px;width: 16%;float: left;margin-left: 6px;"/>
				<input type="number" name="max_price" value="<?=$_GET['max_price']?>" class="form-control input-sm" placeholder="请输入消费金额最大值" style="height: 35px;width: 16%;float: left;margin-left: 6px;"/>

					<select class="form-control m-b" name="province" id="seleAreaNext" onchange="getProvince(this,'#seleAreaThird')" style="width: 16%;float: left;    margin-left: 6px;">
					<option value="">请选择省</option>
					</select>


					<select class="form-control m-b" name="city" id="seleAreaThird" onchange="getSelCity(this, '#seleAreaFouth')" style="width: 16%;float: left;    margin-left: 6px;">
					<option value="">请选择市</option>
					</select>


					<select class="form-control m-b" name="district" id="seleAreaFouth" style="width: 16%;float: left;margin-left: 6px;">
					<option value="-1">请选择区</option>
					</select>

			</div>
			<div class="col-sm-2" >
				<button class="btn btn-sm btn-default" type="submit" >搜索</button>
				<a href="{:U('Users/users_list')}" class="btn btn btn-info btn-sm" >清空</a>
			</div>
		</div>
		</form>
		<input type="hidden" id="company_province_id" value="{$_GET['province']}">
		<input type="hidden" id="company_city_id" value="{$_GET['city']}">
		<input type="hidden" id="company_district_id" value="{$_GET['district']}">
		<section class="panel panel-default">
			<div class="table-responsive">
				<table class="table table-striped b-t b-light text-sm">
					<thead>
						<tr>

							<th>会员</th>
							<th class="center">会员等级</th>

							<th class="center">账户余额</th>
							<th class="center">已消费</th>
							<th class="center">区域</th>
							<th class="center">注册&amp;登录</th>
							<th class="center">状态</th>
							<th class="center">操作</th>
						</tr>
					</thead>
					<tbody id="list">
						<foreach name="users_list" item="v">
							<tr align="center">
								<td align="left">
									<img src="{$v.user_pic}" class="head-portrait" style="float: left;">
									<span style="float: left;margin-left: 6px;line-height: 20px;">
										昵称 : {$v.username}<br>
										手机 : {$v.phone}
									</span>
								</td>
								<td class="tal">普通会员</td>

								<td class="tal">¥{$v.money}</td>
								<td class="tal">¥{$v.count_price}</td>
								<td class="tal">
									<php>
										if($v['province_id']){
											$province=getProvinceInfo($v['province_id']);
										}else{
											$province='';
										}
										if($v['city_id']){
											$city=getCityInfo($v['city_id']);
										}else{
											$city='';
										}
										if($v['district_id']){
											$district=getDistrictInfo($v['district_id']);
										}else{
											$district='';
										}

									</php>
									{$province.province_name} {$city.city_name} {$district.district_name}
								</td>
								<php>
									if($v['login_time']==''){ $v['login_time']=date('Y-m-d H:i:s',$v['addtime']); }
								</php>
								<td class="tal">注册时间 : {:date('Y-m-d H:i:s',$v['addtime'])}<br>最后登录 :{$v['login_time']}</td>
								<td style="color:green;">
									<eq name="v.ishidden" value="0">禁用</eq>
									<eq name="v.ishidden" value="1">启用</eq>
								</td>
								<td>
									<notempty name="v['phone']">
										<a href="{:U('users/angel',array('id'=>$v['id']))}">天使代言人</a><br>
										<a href="{:U('users/accountdetail',array('id'=>$v['id']))}">余额明细</a><br>
										<a href="{:U('users/xiaofeidetail',array('id'=>$v['id']))}">消费明细</a><br>
									</notempty>
									<empty name="v['phone']">
									  第三方用户<br/>不支持修改
								    </empty>

							</tr>
						</foreach>
					</tbody>
				</table>
			</div>

			<footer class="panel-footer">
				<div class="row" id="page">
				<div class="col-sm-2 text-center">
						<small class="text-muted inline m-tb-8">总计 <span id="total_count_num">{$count}</span>个记录</small>
					</div>
					<div class="col-sm-5 text-right text-center-xs">
						<ul class="pagination pagination-sm m-t-none m-b-none">
							{$page}
						</ul>
					</div>
				</div>
			</footer>

		</section>
</section>
</div>

<script src="/Partner/static/js/jquery.min.js?v=2.1.4"></script>
<script src="/NewAdmin/js/init_address.js"></script>
<script type="text/javascript">

    $(function() {
        if($("#company_province_id").val() == null) {
            provice_id = 0;
        } else {
            provice_id = $("#company_province_id").val();
        }
        if($("#company_city_id").val() == null) {
            city_id = -1;
        } else {
            city_id = $("#company_city_id").val();
        }
        if($("#company_district_id").val() == null) {
            district_id = -1;
        } else {
            district_id = $("#company_district_id").val();
        }

        if(provice_id == 0) {
            initProvince('#seleAreaNext');
        } else {
            load('province', provice_id, 'city', city_id, 'district', district_id);
        }



    });
</script>

